import '../styles/state.less';
export function state() {
    return function (target: any, methodName: string, descriptor: PropertyDescriptor) {
        let oldFunc = descriptor.value as Function;
        descriptor.value = function(...param: any[]) {
            let startTime = new Date().getTime();
            let result = oldFunc.apply(this, param);
            let useTime =  new Date().getTime() - startTime;
            console.log(target.constructor.name+'.'+methodName+':  '+useTime+'ms');
            return result;
        }
    }
}